#!/bin/bash

DEPS=lib

SCRIPT_DIR=`dirname $0`
CLASSPATH="./src:./test"

# Add jar files to classpath
for f in "$DEPS"/*.jar; do
    CLASSPATH=$CLASSPATH:$f
done

for dir in "checkouts"; do
    CLASSPATH=$CLASSPATH:$dir/src
done

# Attempted Windows compatibility
if [[ "$OSTYPE" == 'cygwin' ]]; then
  CLASSPATH=`cygpath -wp "$CLASSPATH"`
fi

DEFINES=-Djava.library.path=native/linux/x86,sun.java2d.opengl=False

# TODO: Tryout these args to use the parallel GC
#-XX:+UnlockExperimentalVMOptions -XX:+UseG1GC
#-XX:MaxGCPauseMillis =50 (for a pause time target of 50ms)
#-XX:+G1ParallelRSetUpdatingEnabled -XX:+G1ParallelRSetScanningEnabled

echo "-cp $CLASSPATH $DEFINES"
